﻿{% extends "base.html" %}



{% block css %}
<link rel="stylesheet" href="/static/css/admin.css">
<link rel="stylesheet" href="/static/ztree3/css/bootstrapStyle/bootstrapStyle.css" type="text/css">
{% endblock %}


{% block center %}


<!--头部导航-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-body">
    <ol class="breadcrumb" style="margin-bottom: 0px;background-color: #FFFFFF;">
      <li><a href="/" style="color: #377CD8;">首页</a></li>
      <li><a href="#">发布管理</a></li>
      <li class="active">{{ title }}</li>
    </ol>
  </div>
</div>



<!--用户信息-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-heading">
      <div class="row" style="padding-top:5px;padding-left:10px;">
          <div class="col-sm-6">

              <a class="btn btn-sm btn-success" data-toggle="modal" data-target="#projectModal"> 添加项目 </a>

          </div>
      </div>

  </div>
  <div class="panel-body">


        <div style="margin-bottom: 10px;">

            <div class="col-sm-12">
                <table class="table table-hover table-bordered">
                  <thead>
                    <tr style="background-color: #f5f5f5;">

                      <th>项目名称</th>
                      <th>描述</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody>


                    {% for  project in project_list %}
                    <tr>

                      <td>{{ project.project_name }}</td>
                      <td>{{ project.project_msg }}</td>
                      <td style="padding-left:5px;">

                        <a href="#" name="edit-project" style="text-decoration:none;"  project_id="{{ project.project_id }}" data-toggle="tooltip" data-placement="left" title="修改"><span class="fa fa-pencil"></span> </a>&nbsp;&nbsp;&nbsp;

                        <a href="#"  name="del-project" style="text-decoration:none;" project_id="{{ project.project_id }}" data-toggle="tooltip" data-placement="right" title="删除"><span class="fa fa-trash"></span> </a>

                      </td>
                    </tr>
                    {% endfor %}
                  </tbody>
                </table>

                <div style="margin-top:-30px;padding-right:9%">
                  <ul class="pagination pull-right">
                    <li><a href="#">上一页</a></li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">下一页</a></li>
                  </ul>
                </div>
            </div>

        </div>
  </div>
</div>


{% endblock %}


<!-- Modal -->
{% block modal %}

<div class="modal fade" id="projectModal" tabindex="-1" role="dialog" aria-labelledby="projectModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content" style="margin-top:135px;">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="projectModalLabel">添加项目</h4>
      </div>
      <div class="modal-body">

         <form>
          <div class="form-group">
            <label >项目名称</label>
            <input  class="form-control"  placeholder="项目名称" id="project-name">
          </div>
          <div class="form-group">
            <label >描述</label>
            <input  class="form-control"  placeholder="描述" id="project-msg">
          </div>

        </form>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="sub-project">提交</button>
      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="edit-projectModal" tabindex="-1" role="dialog" aria-labelledby="edit-projectModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content" style="margin-top:135px;">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="edit-projectModalLabel">修改项目</h4>
      </div>
      <div class="modal-body">

         <form>
          <div class="form-group">
            <label >项目名称</label>
            <input  class="form-control"  placeholder="项目名称" id="edit-project-name">
          </div>
          <div class="form-group">
            <label >描述</label>
            <input  class="form-control"  placeholder="描述" id="edit-project-msg">
          </div>

        </form>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="sub-edit-project">提交</button>
      </div>
    </div>
  </div>
</div>


{% endblock  %}

{% block js %}

    <script type="text/javascript" src="/static/js/code.js"></script>
    <script>
        $(function () {
          $('[data-toggle="tooltip"]').tooltip()
        })
    </script>

{% endblock %}


